﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestPaper
{
	class DecideClass : FlowLayoutPanel
	{
		private CheckBox answer;
		private bool rightAnswer;

		public DecideClass(string ans, bool right)
		{
			rightAnswer=right;
			answer = new CheckBox();
			answer.Text = ans;
			answer.Margin=new Padding(0);
			answer.AutoSize=true;
			
			this.FlowDirection = FlowDirection.TopDown;
			this.WrapContents = false;
			this.AutoSize = true;
			this.Margin=new Padding(0,10,0,0);
			this.Controls.Add(answer);
		}
				
		public bool GetChoice()
		{
			return answer.Checked;
		}
		
		public int GetScore()
		{
			if(answer.Checked==rightAnswer) return 1;
			else return 0;
		}
	}
}
